#include <iostream>
#include <stdio.h>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long ll;
const ll MAXN=10007;
ll res[MAXN];
void Init() {
	memset(res, 0, sizeof(res));
	res[0]=1;
	for (int i=1; i*i*i<MAXN; ++i) {
		int tmp=i*i*i;
		for (int j=tmp; j<MAXN; ++j) {
			res[j]+=res[j-tmp];
		}
	}
}
int main() {
	Init();
	ll ask;
	while (cin>>ask) {
		cout<<res[ask]<<endl;
	}
	return 0;
}
